﻿<local:DocumentBase x:Class="WPFExcelReport.YGRONAV95"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                        
                        xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                        xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                        xmlns:UserControls="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Controls"
                        xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                          xmlns:SSM="clr-namespace:WPFExcelReport;assembly=TICC_STDMACHINE"
                        xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS"
                        xmlns:db="clr-namespace:INTEX.DataBase"
                        xmlns:me="clr-namespace:WPFExcelReport"
                        xmlns:WF="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTS"  
                        Loaded="Window_Loaded"  
                        Background="White"  
                        HorizontalAlignment="Stretch"
                        Margin="0,0,0,0" 
                        Name="TV"
                        VerticalAlignment="Stretch"
                    >
    <local:DocumentBase.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:TextTrimmingConverter x:Key="Trim"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <CollectionViewSource   x:Key="vwABAX" Source="{Binding Path=SetMaster.ICC_ABAX}" /> 
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=SetMaster.VKKOPF}" />
        <CollectionViewSource  x:Key="vwABPOS" Source="{Binding Path=SetDetail.ABPOS}" />
        <CollectionViewSource  x:Key="vwMU" Source="{Binding Path=SetDetail.ICC_ABAX}" />
        <CollectionViewSource  x:Key="vwGAAUF" Source="{Binding Path=SetDetail.GAAUF}" />
        <CollectionViewSource  x:Key="vwAPKOPF" Source="{Binding Path=SetEnv.APKOPF}" />
        <CollectionViewSource  x:Key="vwAPZUORD" Source="{Binding Path=SetMaster.APZUORD}" />
        <CollectionViewSource   x:Key="vwTABAX" Source="{Binding Path=SetDetail.ICC_ABAX}" />
        <CollectionViewSource  x:Key="vwTGAAUF" Source="{Binding Path=SetDetail.GAAUF}" />
    </local:DocumentBase.Resources> 
       <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <WrapPanel Grid.Row="0" >
                    <Button Margin="20,0,0,0" Content="任务" Click="VKCommand"/>
                    <Button Margin="20,0,0,0" Content="计划" Click="ABCommand"/>
                    <Button Margin="20,0,0,0" Content="生产线负载" Click="AK02Command"/>
                    <Button Margin="20,0,0,0" Content="纱支分布" Click="YNZCommand"/>
            <WF:TBTNEXE DLL="YGRABFB" CMD="YGRABFB" STWNW="YGRABFB" INFO="开单统计"
                        IsInfo="True" Width="100"/>
                </WrapPanel>
                <SSM:TAK02 Grid.Row="1" Visibility="{Binding IsAK02,ElementName=TV,Converter={StaticResource bv}}"/>
                <SSM:TAK02YN Grid.Row="1" Visibility="{Binding IsYNZ,ElementName=TV,Converter={StaticResource bv}}"/>
                <Grid Grid.Row="1" Visibility="{Binding IsVK,ElementName=TV,Converter={StaticResource bv}}">
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="1*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*" />
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                        <WrapPanel>
                            <Button  Height="30"  Width="30" Margin="0,0,0,0"   IsEnabled="True" Click="btnLoadVKPList_Click">
                                <Button.Background>
                                    <ImageBrush ImageSource="/ImagePackage;component/Images/Refresh.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=刷新}}"></TextBlock>
                            <Button  Height="30"  Width="30" Margin="0,0,0,0"   IsEnabled="True" Click="btnGotoPlan_Click">
                                <Button.Background>
                                    <ImageBrush ImageSource="/ImagePackage;component/Images/Convert.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=计划}}"></TextBlock>
                        </WrapPanel>
                    </StackPanel>
                    <me:VKPLIST x:Name="vwVKPLIST" Grid.Row="1" Grid.RowSpan="1" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></me:VKPLIST>
                </Grid>
                <Grid Grid.Row="1" Visibility="{Binding IsAB,ElementName=TV,Converter={StaticResource bv}}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <me:VWPLANVKP Grid.Row="1"  Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Left"/>
                    <me:VWVKP x:Name="vwVKP" Grid.Row="2" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></me:VWVKP>
                    <TextBlock Grid.Row="2" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" 
                           HorizontalAlignment="Center" VerticalAlignment="Center" Name="txtMessage" Foreground="Red" Text="消息提醒" FontSize="18"></TextBlock>
                </Grid>


            </Grid>  
</local:DocumentBase>